#include "Precompiled.h"
#include "EntityLogicPair.h"
#include "IEntityLogic.h"

namespace Game {
namespace Common {

EntityLogicPair::EntityLogicPair(Entity* gameEntity, IEntityLogic* gameLogic) :
        gameEntity(gameEntity),
        gameLogic(gameLogic) {
}

EntityLogicPair::~EntityLogicPair(void) {
}

Entity* EntityLogicPair::GetGameEntity() const {
    return this->gameEntity;
}

IEntityLogic* EntityLogicPair::GetGameLogic() const {
    return this->gameLogic;
}

void EntityLogicPair::Update(const float& elapsedTime) {
    if (this->gameLogic != NULL) {
        this->gameLogic->Update(gameEntity, elapsedTime);
    }
}

}
}
